﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Text;
using System.Threading.Tasks;

namespace HellowWorld   //命名空间
{
    class Program
    {
        enum en
        {
            a,
            b,
            c
        };
        static int Main(string[] args)
        {
            //System.Console.Write("hellow world!");
            //int num1, num2, num3, result;
            //Console.WriteLine("请输入数字a：");
            //num1 = int.Parse(Console.ReadLine());
            //Console.WriteLine("请输入数字b：");
            //num2 = int.Parse(Console.ReadLine());
            //Console.WriteLine("请输入数字c：");
            //num3 = int.Parse(Console.ReadLine());
            //result = num1 + num2 + num3;
            //Console.WriteLine($"结果是{result}");


            //String ID, Name, Tel, Gender;   //定义变量
            //Console.WriteLine("输入客户相关信息：");
            //Console.Write("编号：");
            //ID = Console.ReadLine();
            //Console.Write("姓名：");
            //Name = Console.ReadLine();
            //Console.Write("性别：");
            //Gender = Console.ReadLine();
            //Console.Write("电话：");
            //Tel = Console.ReadLine();
            //Console.WriteLine("客户信息：");
            //Console.Write("编号：{0}\t姓名：{1}\r\n", ID,Name);
            //Console.WriteLine("性别：{0}\t电话：{1}", Gender, Tel);
            //Console.Read();

            //简单计算器
            //数据类型占用内存大小
            #region         
            //Console.WriteLine("char占{0}字节", sizeof(char));
            //Console.WriteLine("char的最大值:{0}", char.MaxValue);
            //#endregion

            //int a = 5;
            //int b = 2;
            //int c = a % b;
            //Console.WriteLine("c={0}", c);
            #endregion



            ////选择语句
            #region
            //bool sexBoy = true;
            //if (sexBoy == true)
            //{
            //    Console.WriteLine("去男卫生间。");

            //}
            //else
            //{
            //    Console.WriteLine("去女卫生间。");
            //}

            //float price = 100;
            //string country = "中国";
            //bool isVip = false;
            //if (isVip)
            //{
            //    if(country=="中国")
            //        Console.WriteLine("折后价格:{0}", price * 0.5f);
            //    else
            //        Console.WriteLine("折后价格:{0}", price * 0.8f);
            //}
            //else
            //{
            //    if (country == "中国")
            //        Console.WriteLine("折后价格:{0}", price * 0.7f);
            //    else
            //        Console.WriteLine("折后价格:{0}", price * 0.98f);
            //}
            //Console.Read()
            #endregion;

            //分支语句
            #region
            //Console.WriteLine("请输入年/月/日：");
            //string str = Console.ReadLine();
            ////拆分字符串
            //char[] sepator={ '/'};
            //string[] strArr = str.Split(sepator);

            //int month = int.Parse(strArr[1]);
            //int sum = 0;
            //int year = int.Parse(strArr[0]);
            //switch (month)
            //{
            //    case 1:
            //        sum = 31;
            //        break;
            //    case 2:
            //        sum = 31 + 28;
            //        break;
            //    case 3:
            //        sum = 31 + 28 + 31;
            //        break;
            //}

            ////判断闰年
            //if(year%400==0||(year%4==0&&year%100==0))
            //{
            //    sum += 1;
            //}
            //if (month == 1)
            //    Console.WriteLine("这是一年中的第{0}天！", sum);
            ////Console.WriteLine(strArr[0]);
            ////Console.WriteLine(strArr[1]);
            ////Console.WriteLine(strArr[2]);
            #endregion


            //一维数组
            #region
            //int[] bymonthday = new int[13]{ 0, 31, 30,31,30,31,30,31,30,31,30,31,30 };
            //Console.WriteLine("请输入年/月/日:");
            //string str = Console.ReadLine();

            //char[] seapartot = { '/' };
            //string[] strArr=str.Split(seapartot);
            //int year = int.Parse(strArr[0]);
            //int month = int.Parse(strArr[1]);
            //int day = int.Parse(strArr[2]);
            //int sum = 0;
            //for(int i=1;i<month;i++)
            //{
            //    sum += bymonthday[i];
            //}

            //Console.WriteLine("总共天数：" + sum);
            #endregion

            //二维数组
            #region
            //声明并初始化
            //int[,] nineBoxArr ={
            //    {4,9,7 },
            //    {3,5,7 },
            //    {8,1,6 }
            //};
            //for (int i = 0; i < 3;i ++)
            //{
            //    for(int j=0; j<3;j++)
            //    {
            //        Console.WriteLine(nineBoxArr[i,j]+" ");
            //    }
            //    Console.WriteLine();
            //}

            //int[,,,,,,,,,,,,] worldArr = new int[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
            #endregion

            Console.WriteLine(sizeof(int));
            en enut = en.a;
            Console.Read();
            return 0;
        }


    }       
}
